﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="getTactics.aspx.cs" Inherits="Manage_Service_getTactics" %>

<table class="grid" cellspacing="0" cellpadding="0" width="100%">
    <thead>
        <tr>
            <th width=100%><%= Resources.labels.setStrategy%></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
            <%  if(model.Count==0) {%>
                <div><%= Resources.labels.noQuestion%></div>
            <%} else{%>
            <div class="tab">
	            <ul>
	            <%  int i = 0;   
	                foreach (Exam.Core.Model.TacticsQuestionType obj in model) {%>
	                <li id="li-<%=obj.QuestionTypeId.Trim() %>" <% if (i==0){Response.Write("class='current'"); } %> ><a href="#"><span><%=obj.QuestionTypeTitle.Trim() %>(<%=obj.TacticsKnowledges.Count %><%= Resources.labels.knowledgeNumber%>)</span></a></li>
	            <% i++;}%>
	            </ul>
            </div>

            <table border="0" cellspacing="0" cellpadding="0" width="100%" class="div-content">
                <tbody>
                <tr><td colspan=2>
                <%  int j = 0;
                    foreach (Exam.Core.Model.TacticsQuestionType obj in model) {%>
                <div style="width:100%;height:360px;overflow-y:scroll;" id="div-li-<%=obj.QuestionTypeId.Trim() %>" class="div-content-<% if (j==0){Response.Write("show"); }else{Response.Write("hide");} %>">
                <table class="dgknow" cellspacing="0" cellpadding="0" >
                
                <%  int k = 1;
                    foreach (Exam.Core.Model.TacticsKnowledge know in obj.TacticsKnowledges) {
                            //如果该知识点下没有任何难度的试题
                            if (know.QuestionDifficulties.Count > 0) {
                        %>
            		<tr><td style="width:50%;">
            		<%=know.Title.Trim()%><%--(共<%=know.QuestionList%>题)--%>&nbsp;&nbsp;
            		<% foreach (Exam.Core.Model.TacticsQuestionDifficulty diff in know.QuestionDifficulties) {%>
            		[<%=diff.QuestionDifficultyTitle.Trim()%>
            		<input 
            		id="<%=diff.QuestionDifficultyId.Trim() %>_<%=know.Id.Trim() %>_<%=obj.QuestionTypeId.Trim() %>" 
            		qtype="<%=obj.QuestionTypeId.Trim() %>" 
            		type="text" 
            		class="inpNum" 
            		maxlength="5" 
            		onkeypress="if(event.keyCode<48 || event.keyCode>57) event.returnValue = false;" 
            		onpaste="return false;" 
            		onafterpaste="return false;" 
            		onkeyup="chkMax(this,'<%=diff.QuestionCount.Trim()%>')" />/<%= String.Format(Resources.labels.questionNumberpoint,diff.QuestionCount.Trim())%>] &nbsp; &nbsp;
            		<% }%>
            		        <%
                                //////////////////////////////////////////////////////////////////////////
                                } %>
            		</td></tr>
                    <%--<% if (k % 2 == 0 && k > 0) { Response.Write("</tr><tr>"); }%>--%>
            	    <% k++; }%>
                        
            	
            	</table>
            	</div>
            	<% j++;
                    }
                    %>
            	
            	</td></tr>
            	</tbody>
	            <tfoot>
	                <tr>
	                    <td align=left colspan="2" >
	                    <div style="float:left;height:25px;padding-top:5px;font-weight:bold;"><%= Resources.labels.SetScore%>：</div>
	                    <%  foreach (Exam.Core.Model.TacticsQuestionType obj in model) {%>
	                    <div style="float:left;margin-left:20px;height:25px;"><%=obj.QuestionTypeTitle.Trim() %>
	                    <input 
	                    id="score<%=obj.QuestionTypeId.Trim() %>" 
	                    class="score"
	                    qtype="<%=obj.QuestionTypeId.Trim() %>" 
	                    type="text"
	                    maxlength="5"
            		    onpaste="return false;" 
            		    onafterpaste="return false;" 
	                    onkeyup="chkScore(this)" 
	                    style="width:45px;ime-mode:disabled;" /></div>
	                    <% }%>
	                    </td>
	                </tr>
	            </tfoot>
            </table>
            
            <%} %>
            </td>
        </tr>
    </tbody>
	<tfoot>
	    <tr>
	        <td align=left > &nbsp;<%= Resources.labels.count%>：</td>
	    </tr>
	</tfoot>
</table>
